package com.hotpot.sys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hotpot.comm.base.Query;
import com.hotpot.sys.mapper.SysUserMapper;
import com.hotpot.sys.pojo.SysUser;
import com.hotpot.sys.service.SysUserService;
/**
 * 描述:实现类
 * @author myx
 * @date 2017年7月11日 下午10:06:43
 */
@Service
public class SysUserServiceImpl  implements SysUserService{
	
	@Autowired
	private SysUserMapper sysUserMapper;


	@Override
	public List<SysUser> queryList(Query query) {
		return sysUserMapper.queryList(query);
	}

	@Override
	public int queryTotal(Query query) {
		return sysUserMapper.queryTotal(query);
	}

	@Override
	@Transactional
	public boolean save(SysUser sysUser) {
		int id = sysUserMapper.save(sysUser);
		if(id!=0){
			return true;
		}
		return false;
	}

	@Override
	@Transactional
	public boolean upate(SysUser sysUser) {
		sysUserMapper.update(sysUser);
		return true;
	}
	

}
